#include <stdio.h>
void main()
{
  char ch1,ch2,ch3;
  scanf("%c%c%c",&ch1,&ch2,&ch3);
  printf("%c,%c,%c\n",ch3,ch2,ch1);
  printf("%d,%d,%d\n",ch3,ch2,ch1);
}